/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.analysisModel;

import java.io.Serializable;
import java.util.ArrayList;

import br.ufmg.dees.insane.util.IMatrix;
import br.ufmg.dees.insane.util.IVector;
import br.ufmg.dees.insane.util.pointValues.PointValues;
import br.ufmg.dees.insane.util.pointValues.StringPointValues;

/** A class representing analysis model referring to the
 *  triagular plate-bending element conforming of 
 *  six nodes developed by Hsien, Clough and Tocher 
 *  called HCT triangle.
 * @author Samir
 * @since 27/09/2006
 */
public class VeubekeKirchhoffPlate extends KirchhoffPlate implements Serializable {
	
	private static final long serialVersionUID = 1L;

	public VeubekeKirchhoffPlate(){
	}
    
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.analysisModel.AnalysisModel#getShapeMatrix(br.ufmg.dees.insane.util.IVector)
     */
    public IMatrix getStateVariableOperator(IMatrix d, IVector n, IMatrix c) {
        IMatrix matrixN = new IMatrix(1, n.getSize());
        matrixN.setZero();
        for(int i = 0; i < n.getSize(); i++){
            matrixN.setElement(0, i, n.getElement(i));
        }
        return matrixN;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.analysisModel.AnalysisModel#getType()
     */
    public String getLabel() {
        return "VeubekeKirchhoffPlate";
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.analysisModel.AnalysisModel#getTransformationMatrix(br.ufmg.dees.insane.util.IMatrix, br.ufmg.dees.insane.util.IMatrix)
     */
	public IMatrix getTransformationMatrix(IMatrix dl, IMatrix cN) {
    	IMatrix transf = new IMatrix(16,16);
    	transf.setIdentity();
        return transf;
	}

    /* (non-Javadoc)
	 * @see br.ufmg.dees.insane.analysisModel.AnalysisModel#getDOFLabels(int)
	 */
    public ArrayList getDOFLabels(int n){
		ArrayList <PointValues> al = new ArrayList<PointValues>();
		PointValues spv1 = new StringPointValues();
	    spv1.addPointValue("Dz");
	    spv1.addPointValue("Rx");
	    spv1.addPointValue("Ry");
		PointValues spv2 = new StringPointValues();
	    spv2.addPointValue("Rn");
		al.add(0,spv1);
		al.add(1,spv1);
		al.add(2,spv1);
		al.add(3,spv1);
		al.add(4,spv2);
		al.add(5,spv2);
		al.add(6,spv2);
		al.add(7,spv2);
		return al;
	}
	
    /* (non-Javadoc)
	 * @see br.ufmg.dees.insane.analysisModel.AnalysisModel#getGeometricOperator(br.ufmg.dees.insane.util.IVector)
	 */
    public IMatrix getGeometricOperator(IVector n1) {
    	IMatrix n = new IMatrix(3, 16);
    	n.setZero();
		n.setElement(0,0,n1.getElement(3));
		n.setElement(1,1, n1.getElement(3));
		n.setElement(0,2,n1.getElement(16));
		n.setElement(1,3, n1.getElement(16));
		n.setElement(0,4,n1.getElement(33));
		n.setElement(1,5, n1.getElement(33));
		n.setElement(0,6,n1.getElement(26));
		n.setElement(1,7, n1.getElement(26));
		return n;
    }

	/* (non-Javadoc)
	 * @see br.ufmg.dees.insane.analysisModel.AnalysisModel#modifyInternalVariableOperator(br.ufmg.dees.insane.util.IMatrix, br.ufmg.dees.insane.util.IMatrix)
	 */
	public IMatrix modifyInternalVariableOperator(IMatrix e, IMatrix p) {
		IMatrix B = new IMatrix(3,16);
		return B;
	}

	public ArrayList getDOFLabels() {
		// TODO Auto-generated method stub
		return null;
	}

	public IMatrix getPMatrix() {
		// TODO Auto-generated method stub
		return null;
	}
}